package exception;

import java.io.IOException;
import java.sql.SQLClientInfoException;

public class ThrowsDemo {
    public void test() throws IllegalAgeException, IOException {

    }
}
class SubClass extends ThrowsDemo {
    //public void test() throws IllegalAgeException {}//允许完全相同
    //public void test() {}//允许不抛出异常
    //public void test() throws IOException {}//允许抛出部分异常
    //public void test() throws Exception{}//不允许抛出大于父类异常
    //public void test() throws SQLClientInfoException{}//不允许抛出额外的异常
}